Skip to main content

XPath Definitions

XPath Definitions represent expressions that obtain values from the business data model and update them as well. In contrast to the Constants definitions, the XPath Definitions must be associated with a Process or Application.

These definitions are meant to be used when defining Policies; therefore, when created, their name should be as clear as possible to be easily understood.

XPath Definitions can be related to single attributes or to collections. When related to single attributes, the Definitions can be used to get or set values. Collections can be used to get values using functions.

Available Functions for Collections:

  • Sum: Returns the sum of numbers or currency fields of the collection.
  • Count: Returns the number of records found in the selected collection.
  • Minimum value: Returns the smallest number, currency, or date of the collection.
  • Maximum value: Returns the largest number, currency, or date of the collection.
  • Average: Returns the average of specific numbers or currency fields of the collection.
  • Empty: Returns TRUE if the collection is empty, or FALSE if it is not.
  • Exists: Returns TRUE if an attribute with a condition is found in the collection.

How to Create XPath Definitions

  1. When New Definition is selected, a new window is displayed to name the XPath. The name must be self-explanatory because these Definitions will be used when Expressions and Policies rules are configured.

    XpathDefinitions5

  2. The window to select the XPath from the data model is displayed. Click Next when the attribute has been selected.

    XpathDefinitions6

  3. In the next window, select the destination use for the new Definition. If the XPath definition will be used to assign values on the associated attribute, select Set a value. Otherwise, if the XPath definition will be used to obtain the attribute’s current value, select Get a value.

    Click Finish after selecting the corresponding option.

    XpathDefinitions7


  1. When New Definition is selected, a new window is displayed to name the XPath. The name must be self-explanatory because these Definitions will be used when Expressions and Policies rules are configured.

    XpathDefinitions1

  2. The window to select the XPath from the data model is displayed. Click Next when the attribute has been selected.

    XpathDefinitions2

  3. Select the Function to apply to the records contained in the selected attribute.

    XpathDefinitions3

  4. In the next window, you can select whether this Definition will be used to get or set a value. However, since we selected an attribute in a collection and collections are used to get values, the only permissible use will be to get a value.

    Click Finish to create the XPath Definition.

    XpathDefinitions4


How to Filter Collection XPath Definitions

The records of the collection Definition can be filtered with different conditions. These conditions are specified when selecting the XPath.

You can define if all (AND operator) or some (OR operator) of the conditions included must be fulfilled. The default option is the AND operator.

XpathDefinitions8

To include multiple conditions, click Add filter condition. A new row is inserted in the table. The following information must be entered in the table:

  • Left Operator: The attribute to be evaluated in the condition.
  • Operator: Select the operator for the condition.
  • Right Operator: Constant value or attribute to complete the condition.

The following table shows the different operators available according to the Attribute type of the Left Operator:

AttributesOperators
Numerical attributesEqual, Different, Less Than, Less Than or Equal, Greater Than, Greater Than or Equal
Text attributesEqual, Different

Click the 'X' icon located on the right side of the condition to delete it if necessary. A window to confirm the deletion will be displayed.

XpathDefinitions9

Note
All the records of the relation are retrieved if no filter is specified.


How to Edit/Delete XPath Definitions

  1. Access the Vocabulary option from the Processes Module or the Application Module where the Definition was created. Identify the XPath Definition and right-click it.

    Select the Edit Definition or Delete Definition option according to the required action.

    XpathDefinitions10

  2. If you selected the Edit option, the Definition editor will be opened. Follow the same steps explained to create the Definition, except for naming it.

    If you selected the Delete option, a confirmation screen will be displayed. Click Yes to delete the definition.

    XpathDefinitions11

Note
Definitions that are in use by a Policy cannot be deleted.